# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=mcabber
pkgver=1.1.0
pkgrel=4
pkgdesc="A small Jabber console client"
url="https://mcabber.com"
arch="all"
license="GPL-2.0-or-later"
depends="beep"
options="libtool"
makedepends="loudmouth-dev glib-dev ncurses-dev gpgme-dev aspell-dev
	libotr-dev libidn-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://mcabber.com/files/mcabber-$pkgver.tar.bz2
	fix-roster-colors-on-freebsd.patch"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--disable-static \
		--enable-hgcset \
		--enable-aspell \
		--enable-otr \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

package() {
	make DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/examples
	install -m644 mcabberrc.example \
		"$pkgdir"/usr/share/doc/$pkgname/examples/mcabberrc.example
}

sha512sums="d12546e9fe9da94b6107f4d38d4083bee74e2702f7f2225e26be291230c6fe1319f60a3204da669dc00b14d69822425bf8214ebb723c3c4a7a33b1247a03093f  mcabber-1.1.0.tar.bz2
e8a1207eb04497b4e6ddfc5b6a55c9d6e07094504f472c4b643eeee1adfd81a1b38d64b82d8fec51d4bba757ca2e377f2e339a13f76c8ea0744a28ab3acc18a0  fix-roster-colors-on-freebsd.patch"
